from wxauto import *

wx = WeChat()
wx.GetSessionList()


def get_single_messages(name):
    wx.ChatWith(name)
    msgs = wx.GetAllMessage
    for msg in msgs:
        print('%s : %s' % (msg[0], msg[1]))


def get_multi_messages(names):
    for name in names:
        wx.ChatWith(name)
        msgs = wx.GetAllMessage
        for msg in msgs:
            print('%s : %s' % (msg[0], msg[1]))


if __name__ == '__main__':
    # name = '孤狼'
    # get_single_messages(name)

    names = ['三只大', '微信群']
    get_multi_messages(names)
